﻿using Mes.Domain.BoundedContext.EntityBase;

namespace Mes.Domain.BoundedContext.Entities.Operations
{
    /// <summary>
    /// 物料和工艺关联表
    /// Specifies the process(es) used to produce a particular item
    /// </summary>
    public class ItemProcessLink : NoIdEntityBase
    {
        /// <summary>
        /// 物料ID
        /// Identify item to be made
        /// </summary>
        public int MaterialId { get; set; }

        /// <summary>
        /// 工艺ID
        /// Identify process to make it
        /// </summary>
        public string Process_Id { get; set; } = string.Empty;

        /// <summary>
        /// Process with lowest number is the preferred one
        /// </summary>
        public int Item_Pref { get; set; }

        /// <summary>
        /// -1 = Disabled, 1 = Experimental, 2 = Approved, 3 = Certified
        /// 状态
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// Why record was changed
        /// </summary>
        public string Last_Edit_Comment { get; set; } = string.Empty;

        /// <summary>
        /// Who last changed record
        /// </summary>
        public string Last_Edit_By { get; set; } = string.Empty;

        /// <summary>
        /// When record last changed
        /// </summary>
        public string Last_Edit_At { get; set; } = string.Empty;

        /// <summary>
        /// Changes when modified
        /// </summary>
        public long Mod_Id { get; set; }

        /// <summary>
        /// Unique row identifier, for audit trail
        /// </summary>
        public int Row_Id { get; set; }
    }
}
